{extend name="$_admin_base_layout" /}

{block name="content"}
<!-- <div class="alert alert-info alert-dismissable">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
    <h3 class="font-w300 push-15">温馨提示</h3>
    <p>相关参数设置，请在【配置管理】>【<a class="alert-link" href="{:url('admin/menu/index', ['group' => 'admin'])}">参数配置</a>】中设置，或 <a
            class="alert-link" href="{:url('admin/menu/index', ['group' => 'admin'])}">点此</a> 跳转。</p>
    <p>先 <a class="alert-link" href="{:url('cms/column/add')}">创建栏目</a>，</p>
</div> -->

<div class="block-content block-content-full block-content-mini bg-gray-lighter text-muted font-w600 text-center">
    {$tjtitle}
</div>
<div id="mountNode" style="
    background:white;margin-bottom:30px;padding:20px;width:100%;height:50%;"></div>

<script>/*Fixing iframe window.innerHeight 0 issue in Safari*/
document.body.clientHeight;</script>
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.g2-3.5.1/dist/g2.min.js"></script>
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.data-set-0.10.1/dist/data-set.min.js"></script>
<script>
    var data = {:$line};
    var chart = new G2.Chart({
        container: 'mountNode',
        forceFit: true,
        height: window.innerHeight / 2,
        width: window.innerWidth,
        padding: [30, 100, 30, 50],
    });

    chart.source(data);
    chart.scale('value', {
        min: 0,
        alias: "{$tjtdw}"
    });
    chart.scale('year', {
        range: [0, 1]
    });
    chart.tooltip({
        crosshairs: {
            type: 'cross'
        }
    });
    chart.line().position('year*value');
    chart.point().position('year*value').size(4).shape('circle').style({
        stroke: '#fff',
        lineWidth: 1
    });
    chart.render();
</script>

<div class="row">
    <!-- <div class="col-sm-6 col-md-4">
        <a class="block block-link-hover3 text-center" href="">
            <div class="block-content block-content-full">
                <div class="h1 font-w700 text-danger" data-toggle="countTo" data-to="{$tot_num_money|default=0}"></div>
            </div>
            <div class="block-content block-content-full block-content-mini bg-gray-lighter text-muted font-w600">总交易量
            </div>
        </a>
    </div> -->
   <!--  <div class="col-sm-6 col-md-4">
        <a class="block block-link-hover3 text-center" href="">
            <div class="block-content block-content-full">
                <div class="h1 font-w700 text-warning" data-toggle="countTo" data-to="{$tot_num|default=0}"></div>
            </div>
            <div class="block-content block-content-full block-content-mini bg-gray-lighter text-muted font-w600">总笔数
            </div>
        </a>
    </div> -->
    <div class="col-sm-6 col-md-4">
        <a class="block block-link-hover3 text-center" href="">
            <div class="block-content block-content-full">
                <div class="h1 font-w700 text-success"><span data-toggle="countTo" data-to="{$num|default=0}"></span></div>
            </div>
            <div class="block-content block-content-full block-content-mini bg-gray-lighter text-muted font-w600">总用户
            </div>
        </a>
    </div>
    <!-- <div class="col-sm-6 col-md-3">
        <a class="block block-link-hover3 text-center" href="">
            <div class="block-content block-content-full">
                <div class="h1 font-w700 text-primary" data-toggle="countTo" data-to="{$tot_num|default=0}"></div>
            </div>
            <div class="block-content block-content-full block-content-mini bg-gray-lighter text-muted font-w600">门店用户
            </div>
        </a>
    </div> -->
</div>
{/block}

{block name="script"}
<script src="__ADMIN_JS__/core/jquery.countTo.min.js"></script>
<script>
    jQuery(function () {
        App.initHelpers(['appear-countTo']);
    });
</script>
{/block}